<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
  <Style TargetType="{x:Type RichTextBox}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RichTextBox}">
          <Border
             Background="{TemplateBinding Panel.Background}"
             BorderBrush="{StaticResource NormalBorderBrush}"
             BorderThickness="1"
             Name="border" 
             ClipToBounds="True"
             CornerRadius="3" 
             SnapsToDevicePixels="True">
            <ScrollViewer
               Margin="1" 
               Name="PART_ContentHost"
               SnapsToDevicePixels="True" />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="UIElement.IsEnabled" Value="False">
              <Setter Property="Panel.Background" TargetName="border" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
              <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>